package cn.diancan.util;

import cn.diancan.model.PurchaseSaleOrder;
import cn.diancan.service.PurchaseSaleOrderService;
import cn.diancan.util.spring.SpringContextUtil;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * @author Sky
 */
public class Vmain {

    public static void main(String[] arg){
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:beans.xml");//此文件放在SRC目录下
        //purchaseSaleOrderService.
        PurchaseSaleOrderService purchaseSaleOrderService = (PurchaseSaleOrderService)SpringContextUtil.getBean("purchaseSaleOrderService");
        List<PurchaseSaleOrder> list = purchaseSaleOrderService.findPurchaseSaleOrderList(1, 10);
        if(ObjectUtils.isNotBlank(list)){
            for (int i = 0; i < list.size(); i++) {

            }
        }
    }
}
